package SetKnowledge;

import java.util.Scanner;

public class StairsRecurrence {

	public static void main(String[] args) {
		Long begin = System.currentTimeMillis();
		Scanner sc = new Scanner(System.in);
		int stairNum = Integer.parseInt(sc.nextLine());// 输入楼梯级数
		System.out.println(sum(stairNum));
		Long end = System.currentTimeMillis();
		System.out.println(end - begin);
	}

	public static int sum(int n) {
		if (n == 1) {
			return 1;
		}
		if (n == 2) {
			return 2;
		}
		return sum(n - 1) + sum(n - 2);
	}
}
